/**
 * @description: 版本
 */
import { defHttp } from '@/apis/http'
import type { CommonAPI } from '@/apis/schema/all'
/** 获取安装命令 */
export const getApiNodeInstallCommandApi: CommonAPI<
  '/api/node/install-command',
  'get'
> = (params) => defHttp.get(`/api/node/install-command`, { params })

/** 获取安装脚本 */
export const getApiNodeInstallerApi: CommonAPI<'/api/node/installer', 'get'> = (
  params
) => defHttp.get(`/api/node/installer`, { params })

/** 获取最新版本 */
export const getApiNodeVersionLatestApi: CommonAPI<
  '/api/node/version/latest',
  'get'
> = (params) => defHttp.get(`/api/node/version/latest`, { params })

/** 切换版本 */
export const updateApiNodeVersionSwitchApi: CommonAPI<
  '/api/node/version/switch',
  'put'
> = (data) => defHttp.put(`/api/node/version/switch`, { data })

/** 更新状态 */
export const updateApiSystemUpdateStatusApi: CommonAPI<
  '/api/system/update-status',
  'get'
> = (params) => defHttp.get(`/api/system/update-status`, { params })
